<div class="zs-body" data-ng-init="treeFormInit('cms_site', {
		keyField:'id',
		orderObject:{order:0},
		pageSize:12,
		queryObject : {pid:'0'},
		defaultObject:{leaf:false},
		treeNavs:[{pid:'0',n:'所有站点'}]
	}) && loadData('cms_site');setConHei();">
    <div class="zs-map-tool">
        <div class="location">
            <a >首页</a>
            <i class="right-arr"></i>
            <a >门户配置</a>
            <i class="right-arr"></i>
            <a >站点管理</a>
        </div>
        <div class="option">
            <input type="button" class="zs-btn orange" value="新建" 
                ng-click="addTreeRow('cms_site') && openWindow('edit');"/>
            <input type="button" class="zs-btn orange" value="编辑" 
                ng-click="editRow('cms_site', cms_site.sRows[0]) && openWindow('edit')"/>
            <input type="button" class="zs-btn orange" value="删除 "
                ng-click="delEntitys('cms_site')"/>
        </div>
    </div>
    <div class="zs-content" style="position:unset">
        <div class="zs-nice-tab idTabs">
            <div class="tool item" style="margin-left:6px;">
                <span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" class="zs-input" placeholder="站点名称" ng-model="cms_site.queryObject['display:like']"/>
                </span>
            </div>
            <div class="operation item">
                <a class="ope-1" ng-click="loadData('cms_site')"></a>
                <a class="ope-2"></a>
            </div>
            <div class="tool item" style="width: 380px">
        		<div class="zs-nav">
		    		<a ng-click="preNav('cms_site')">返回上一级</a> | 
		    		<span ng-repeat="r in cms_site.treeNavs">
		    			<a ng-click="indexNav('cms_site',$index)">{{r.n}}</a> 
		    			<label ng-if="$index!=cms_site.treeNavs.length-1"> > </label>
		    		</span>
		    	</div>
        	</div>
            <div class="switch">
            </div>
        </div>
        <div class="date-container">
            <div id="zpgwd">
                <div class="zs-data-table">
                    <div class="container">
                    	<table>
			                <thead>
			                    <tr>
			                        <th>
			                        	<input id="allCheckbox" type="checkbox"
			                        		ng-click="selectAll('cms_site','allCheckbox');">
			                        </th>
			                        <th>序号</th>
			                        <th>站点名称(编号)</th>
			                        <th>所属机构</th>
			                        <th>是否有效/子节点</th>
			                        <th>备注</th>
			                    </tr>
			                </thead>
			                <tbody>
			                    <tr ng-repeat="r in cms_site.datas">
					                <td><input type="checkbox"
						                    ng-click="selectRow('cms_site',r);"
						                    ng-model="r.selected" />
					                </td>
					                <td>
					                    <a ng-click="!r.leaf && addNav('cms_site',r.id,r.display)">
					                        <label ng-bind="r.order"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="!r.leaf && addNav('cms_site',r.id,r.display)">
					                        <label ng-bind="r.display"></label>(<label ng-bind="r.id"></label>)
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('cms_site',r) && openWindow('edit');">
					                        <label ng-bind="r.organizationName"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('cms_site',r) && openWindow('edit');">
					                        <label ng-bind="r.valid | asChineseBool"></label>
					                        /
					                        <label ng-bind="r.leaf | asChineseBool"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('cms_site',r) && openWindow('edit');">
					                        <label ng-bind="r.info"></label>
					                    </a>
					                </td>
					            </tr>
			                </tbody>
			            </table>
                    </div>
                </div>
                <div class="zs-pagination-box">
                    <ag-Page fn='cms_site'></ag-Page>
                </div>
            </div>
        </div>

        <div ag-Window id="edit" title="站点编辑" width='560px' height='180px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form" novalidate>
				    <table width="100%">
				        <tbody>
				        	<tr>
				        		<td class="text" width="20%">*编号</td>
		                        <td class="left" width="30%">
		                        	<input type="text" ng-model="cms_site.editRow.id"
		                            	class="zs-input" ng-if="cms_site.editRow.FIELD_ISNEW" required>
		                            <label ng-bind="cms_site.editRow.id"
		                            	ng-if="!cms_site.editRow.FIELD_ISNEW"></label>
								</td>
								<td class="text" width="20%">*名称</td>
		                        <td class="left" width="30%"><input type="text"
		                            ng-model="cms_site.editRow.display"
		                            class="zs-input" required></td>
		                    </tr>
		                    <tr>
		                        <td class="text" width="20%">所属机构</td>
		                        <td class="left" width="30%">
		                        	<span>
					                    <ag-Combotree class="zs-input" style="width:154px;height: 28px" 
											fn='orgidEdit'
											para="{ uDictionary:true,
													dictionary:'p_organization',
													pidField:'pid',
		                    						leafField:'leaf'}"
											ng-model="cms_site.editRow.organizationId"
											text-Value="cms_site.editRow.organizationName"/>
		                        	</span>
		                        </td>
		                        <td class="text" width="20%"></td>
		                        <td class="left" width="30%">
		                        	<input type="checkbox" ng-model="cms_site.editRow.valid"
		                        		ng-true-value="true" ng-false-value="false" value='false' />
		                        	有效 
		                        	<input type="checkbox" ng-model="cms_site.editRow.leaf"
		                        		ng-true-value="true" ng-false-value="false" value='false' />
		                        	子节点
		                        </td>
		                    </tr>
		                    <tr>
		                    	<td class="text" width="20%">序号</td>
		                        <td class="left" width="30%"><input type="text"
		                            class="zs-input" ng-model="cms_site.editRow.order">
		                        </td>
		                        <td class="text" width="20%">备注</td>
		                        <td class="left" width="30%"><input type="text"
		                            class="zs-input" ng-model="cms_site.editRow.info"></td>
		                    </tr>
				        </tbody>
				        <tfoot>
				            <tr>
				                <td colspan="4">
				                    <input type="button" name="ok" value="保存" class="zs-btn c-red"
				                    	ng-click="formValidate(form) && save('cms_site', cms_site.editRow, saveCloseWindow)"/>
				                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
				                    	ng-click="closeWindow('edit')" />
				                </td>
				            </tr>
				        </tfoot>
				    </table>
				</form>
			</div>
	    </div>
    </div>
</div>